home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
v10n03.arc
/
MAKENUM
< prev
next >
Wrap
Text File
|
1991-01-17
|
438b
|
23 lines
* Procedure to strip all non-numeric characters
* from a string. Note, if string has a minus
* sign, it too will be stripped.
*
PROCEDURE MAKENUM
PARAMETERS string
PRIVATE nums, newstring, x, slen
nums="0123456789"
newstring=""
x = 1
slen = LEN(string)
DO WHILE x <= slen
IF AT(SUBSTR(string,x,1),nums) <> 0)
newstring = newstring + SUBSTR(string,x,1)
ENDIF
X = X + 1
ENDDO
string = newstring
RETURN